
function showMenu() {
    if(menu.flagSound == true){
        if(menuWindow.width < menuWindow.height)
            menuWindow.state ="menuFortrait"
        else
            menuWindow.state ="menuLandscape"
        menu.flagHide = 0
    }
    else{
        if(menuWindow.width < menuWindow.height)
            menuWindow.state ="menuFortraitNoSound"
        else
            menuWindow.state ="menuLandscapeNoSound"
        menu.flagHide = 0
    }
}

function hideMenu(){
    if(menu.flagSound == false){
        menuWindow.state = "menuHideNoSound"
    }
    else{
        menuWindow.state = "menuHide"
    }
    menu.flagHide = 1
}

function restartMusic(){
    audio.stop();
    audio.play();
}
